<?php
$_thread_list=array(
array('subject'=>'标签相关主题','tid'=>'1','fid'=>'1','taglist'=>array(array('name'=>
'唯美','tagid'=>1,'style'=>'info'),array('name'=>'大方','tagid'=>2,'style'=>'light'))),
array('subject'=>'标签相关主题','tid'=>'2','fid'=>'1','taglist'=>array(array('name'=>
'唯美','tagid'=>1,'style'=>'info'),array('name'=>'简洁','tagid'=>3,'style'=>'light'))),
array('subject'=>'标签相关主题','tid'=>'1','fid'=>'1','taglist'=>array(array('name'=>
'唯美','tagid'=>1,'style'=>'info'),array('name'=>'大方','tagid'=>2,'style'=>'light'))),
array('subject'=>'标签相关主题','tid'=>'2','fid'=>'1','taglist'=>array(array('name'=>
'唯美','tagid'=>1,'style'=>'info'),array('name'=>'简洁','tagid'=>3,'style'=>'light'))),
);

?>
<div class="card card-postlist table-responsive">
<div class="card-body">
<div class="card-title">
    <div class="d-flex justify-content-between">
        <div>
            <b>类似标签相关推荐：</b> (<span class="posts"><?php echo count($_thread_list);?></span>)
        </div>
    </div>
</div>
</div>
  <table class="table table-bordered table-hover threadlist text-center bg-white">
       <tr class="text-center">
            <?php $n=0; ?>
            <?php if(!empty($_thread_list)) { foreach($_thread_list as $_thread) { ?>
           <td>
            <a href="<?php echo url("thread-$_thread[tid]");?>" title="<?php echo $_thread['subject'];?>"><?php echo $_thread['subject'];?></a>
            <span>标签🏷️</span>
            <?php foreach($_thread['taglist'] as $tag) { ?>
            <a href="<?php echo url("forum-$_thread[fid]-$page", array('tagids'=>$tag['tagid']));?>" class="badge badge-pill badge-<?php echo empty($tag['style']) ? 'secondary' : $tag['style'];?>"><?php echo $tag['name'];?></a>
            <?php  } ?>
            </td>
            <?php $n++; ?>
            <?php if($n%2==0){ ?>
        </tr>
        <tr class="text-center">
            <?php } ?>
            <?php  }} ?>
      </tr>
  </table>
</div>